<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="lib/jquery-3.3.1.min.js"></script>
</head>
<body>
   <ul>
       <li class="one">1</li>
       <li>2</li>
       <li>3</li>
   </ul>
   <div>
       <input type="text">
   </div>
    <script>
        //text() 获取元素文本
        //text(value) 修改元素的文本
       /*
        attr(key)获取属性的值
        html() 返回标签个内容含HTML标签
        val()返回标签的值
       */
     var txt=$("li:eq(1)").text("hello world");
     console.log(txt);
     var attr=$("li:eq(0)").attr("class");
     console.log(attr);

     var html=$("div").html();
     var value=$("input").val();
     console.log(html);
     console.log(value);
    </script>
</body>
</html>